package com.taotao.st3g8.controller.swagger;//
//package com.ybwh.springboot2.controller.swagger;
//
//import com.ybwh.springboot2.controller.model.FileResp;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestHeader;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @since:knife4j-springdoc-openapi-demo
// * @auth <a href="xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
// * 2022/8/6 16:53
// */
//@RestController
//@RequestMapping("body")
//@Tag(name = "body参数")
//public class BodyController {
//
//    @Operation(summary = "普通body请求")
//    @PostMapping("/body")
//    public ResponseEntity<FileResp> body(@RequestBody FileResp fileResp){
//        return ResponseEntity.ok(fileResp);
//    }
//    @Operation(summary = "普通body请求-put")
//    @PutMapping("/bodyPut")
//    public ResponseEntity<FileResp> bodyPut(@RequestBody FileResp fileResp){
//        return ResponseEntity.ok(fileResp);
//    }
//
//    @Operation(summary = "普通body请求+Param")
//    @PostMapping("/bodyParam")
//    public ResponseEntity<FileResp> bodyParam(@RequestParam("name")String name,@RequestBody FileResp fileResp){
//        fileResp.setName(fileResp.getName()+",receiveName:"+name);
//        return ResponseEntity.ok(fileResp);
//    }
//
//    @Operation(summary = "普通body请求+Param+Header",description = "")
////    @Parameters({
////            @Parameter(name = "token",example = "1",description = "请求token",required = true,in = ParameterIn.HEADER),
////            @Parameter(name = "name",description = "文件名称",required = true,in=ParameterIn.QUERY)
////    })
//    @PostMapping("/bodyParamHeader")
//    public ResponseEntity<FileResp> bodyParamHeader(@RequestHeader("token") String token, @RequestParam("name")String name,@RequestBody FileResp fileResp){
//        fileResp.setName(fileResp.getName()+",receiveName:"+name+",token:"+token);
//        return ResponseEntity.ok(fileResp);
//    }
//
//    @Operation(summary = "普通body请求+Param+Header+Path")
////    @Parameters({
////            @Parameter(name = "id",description = "文件id",in = ParameterIn.PATH),
////            @Parameter(name = "token",description = "请求token",required = true,in = ParameterIn.HEADER),
////            @Parameter(name = "name",description = "文件名称",required = true,in=ParameterIn.QUERY)
////    })
//    @PostMapping("/bodyParamHeaderPath/{id}")
//    public ResponseEntity<FileResp> bodyParamHeaderPath(@PathVariable("id") String id,@RequestHeader("token") String token, @RequestParam("name")String name,@RequestBody FileResp fileResp){
//        fileResp.setName(fileResp.getName()+",receiveName:"+name+",token:"+token+",pathID:"+id);
//        return ResponseEntity.ok(fileResp);
//    }
//}
